<template>
  <m-drawer :footer="false" width="60%" ref="drawerRef" title="字典项管理">
      <DictItemIndex :dictId="currentRecord.id" ref="dictItemIndexRef"/>
  </m-drawer>
</template>
<script setup lang="ts">
import { nextTick, ref } from 'vue';
import DictItemIndex from '../dictItem/index.vue'
const dictItemIndexRef = ref()
const drawerRef = ref();
const currentRecord = ref()
defineExpose({
  show(record: any) {
    currentRecord.value = record
    drawerRef.value.openDrawer()
    nextTick(()=>{
      dictItemIndexRef.value?.getTableRef().reload()
    })
  }
})
</script>
<style lang="less" scoped>

</style>